<?php //废弃的文件
class Usergroupmingxi_ctl extends Ctl{
    function __construct(){
    }
    function main(array $getVars) {
        $this::sessver();
        $type=!empty($_POST['type'])?$_POST['type']:false;
        if(!$type){
        	$id=$getVars['id'];
        	$gname=xdb::getInstance()->getvar("select gname from groupx where id=".$id);
        	$result=xdb::getInstance()->getarray("select * from user ");
        	$guser=xdb::getInstance()->getarray("select * from user where id in(select uid from user_groupx where gid=".$id.")");
        	$this::show('usergroupmingxi',compact('result','id','gname','guser'));
        }elseif ($type=="add"){
        	$array=array();
        	$array2=array();
        	$gid=$_POST['gid'];
        	$uid=$_POST['uid'];
        	$array['uid']=$uid;
        	$array['gid']=$gid;
        	$array2['uid']=$uid;
        	$array2['gid']=$gid;
        	echo xdb::getInstance()->indb('user_groupx', $array, $array2);
        }elseif ($type=="del"){
        	$array=array();
        	$uid=$_POST['uid'];
        	$gid=$_POST['gid'];
        	$array['uid']=$uid;
        	$array['gid']=$gid;
        	echo xdb::getInstance()->deldb('user_groupx', $array);
        }
    }
}